capture log close 
set more off, permanently

// Do-file: Lichtenheld_IO_Rep.do        
// Project: Replication Files for: "Explaining Population Displacement Strategies in Civil Wars: A Cross-National Analysis"
// Author: Adam G. Lichtenheld   
// Date: 18 July 2019

use "SDCC_conflict.dta", clear

cd "/Users/alichtenheld/Dropbox/Research Projects/IO Article/Manuscript/text"

*******************************
********* MAIN ANALYSIS *******
*******************************

****** Bivariate Analysis (Figure 3) ******
tab sd_gov_type techrebel, col row chi2 exact
tab sd_gov_alt techrebel, col row chi2 exact

****** Multivariate Analysis (Table 2, Models 1-6) ******
eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using multinomial.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) booktabs noomitted alignment(D{.}{.}{-1}) longtable title(Strategic Wartime Displacement: Multinomial Logit Results \label{tab:tab4}) 

****External base (not shown in paper)
mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extbase claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extbase claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)

****** Predicted Probabilities (Figure 4) ******
estsimp mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
setx bordconf median irreg median elceliti median extsupp median rebfr median claim_epr median anyelect_ss median gdpcapita mean lpop mean polity2 mean deathsmonth mean milper mean
simqi, listx 
setx bordconf 0
simqi, listx 
setx bordconf 1
simqi, listx 

***** Time Trends (Figure 5) *****
use "SDCC_conflict.dta", clear
keep if irreg == 1 
*Comment out irreg == 1 for first iteration (to get SDdecadeall.dta)

collapse (sum) decade1940 decade1950 decade1960 decade1970 decade1980 decade1990 decade2000, by(sd_gov)
reshape long decade, i(sd_gov) j(year)
reshape wide decade, i(year) j(sd_gov)
gen nosd = decade0/(decade1+decade0)
drop decade0 decade1 
save "nosd.dta", replace

use "SDCC_conflict.dta", clear
keep if irreg == 1

collapse (sum) decade1940 decade1950 decade1960 decade1970 decade1980 decade1990 decade2000, by(reloc_gov)
reshape long decade, i(reloc_gov) j(year)
reshape wide decade, i(year) j(reloc_gov)
gen resett = decade1/(decade1+decade0)
drop decade0 decade1 
save "resett.dta", replace

use "SDCC_conflict.dta", clear
keep if irreg == 1

collapse (sum) decade1940 decade1950 decade1960 decade1970 decade1980 decade1990 decade2000, by(cleans_gov)
reshape long decade, i(cleans_gov) j(year)
reshape wide decade, i(year) j(cleans_gov)
gen cleans = decade1/(decade1+decade0)
drop decade0 decade1
save "cleans.dta", replace

use "SDCC_conflict.dta", clear
keep if irreg == 1

collapse (sum) decade1940 decade1950 decade1960 decade1970 decade1980 decade1990 decade2000, by(sd_gov)
reshape long decade, i(sd_gov) j(year)
reshape wide decade, i(year) j(sd_gov)
gen depop = decade1/(decade1+decade0)
drop decade0 decade1
save "all.dta", replace

use "SDCC_conflict.dta", clear
keep if irreg == 1

collapse (sum) decade1940 decade1950 decade1960 decade1970 decade1980 decade1990 decade2000, by(mk)
reshape long decade, i(mk) j(year)
reshape wide decade, i(year) j(mk)
gen mk = decade1/(decade1+decade0)
drop decade0 decade1 
save "/Users/alichtenheld/Desktop/mk", replace

use "depop.dta"
merge 1:1 year using "cleans.dta"
drop _merge
merge 1:1 year using "resett.dta"
drop _merge
merge 1:1 year using "mk.dta"
drop _merge
merge 1:1 year using "nosd.dta"
drop _merge

replace cleans = cleans*100
replace resett = resett*100
replace mk = mk*100
replace nosd = nosd*100
label variable nosd "No Strategic Displacement"
label variable mk "Mass Killing"
label variable resett "Forced Relocation"
label variable cleans "Cleansing"

save "sdbydecadeALL.dta", replace

save "irregonly.dta", replace

*Create graph
use "sdbydecadeALL.dta", clear
graph twoway connected (nosd mk cleans resett year), xlabel(1940 "1945-49" 1950 "1950-59" 1960 "1960-69" 1970 "1970-79" 1980 "1980-89" 1990 "1990-99" 2000 "2000-08") xtitle("") ylabel(0 "0%" 10 "10%" 20 "20%" 30 "30%" 40 "40%" 50 "50%" 60 "60%", angle(0)) ytitle("% of All Civil Wars") scheme(s2mono)

use "irregonly.dta", clear
graph twoway connected (nosd mk cleans resett year), xlabel(1940 "1945-49" 1950 "1950-59" 1960 "1960-69" 1970 "1970-79" 1980 "1980-89" 1990 "1990-99" 2000 "2000-08", angle(45)) xtitle("") ylabel(0 "0%" 10 "10%" 20 "20%" 30 "30%" 40 "40%" 50 "50%" 60 "60%" 70 "70%" 80 "80%", angle(0)) ytitle("Proportion of Irregular Wars") scheme(s2mono)

gr combine all.gph irreg.gph, ycommon

*******************************
********* APPENDIX *******
*******************************

****** Troop Ratio (Appendix 2.8) ******
eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita ltroopratio irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita ltroopratio irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita ltroopratio elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita ltroopratio elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using troopratio.rtf, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita ltroopratio elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) 

graph box milper if irreg == 1, over(sd_gov_type) ytitle(Military Personnel) nooutsides
graph box ltroopratio if irreg == 1, over(sd_gov_type) ytitle(Troop Ratio (log)) nooutsides

graph box gdpcapita, over(sd_gov_type) ytitle(GDP Per Capita (logged)) nooutsides
graph box gdpcapita if irreg == 1, over(sd_gov_type) ytitle(GDP Per Capita (logged)) nooutsides

***** Alternative Measures of Elections (Appendix 2.6) *****
eststo clear
eststo: quietly mlogit sd_gov_type locelect_ss claim_epr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita ltroopratio elceliti extsupp rebfr claim_epr locelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita ltroopratio elceliti extsupp rebfr claim_epr locelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type election_NELDA claim_epr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita ltroopratio elceliti extsupp rebfr claim_epr election_NELDA irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita ltroopratio elceliti extsupp rebfr claim_epr election_NELDA irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using elections.rtf, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers

***** Mass Killing (Appendix 3.3) *****
eststo clear
eststo: quietly mlogit sd_gov_type mk irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr mk irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss mk irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss mk irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using multinomk.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("Model 1" "Model 2" "Model 3" "Model 4")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr mk anyelect_ss irreg lpop polity2 deathsmonth) booktabs noomitted alignment(D{.}{.}{-1}) longtable title(Strategic Wartime Displacement: Mass Killing \label{tab:tab5656}) 

*********************************
******** ROBUSTNESS CHECKS ******
*********************************

***** Reduced Logit Models (Appendix 4.2) *****
eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar irreg, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf irreg, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type parallelconf gdpcapita milper irreg, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp irreg, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type rebfr irreg, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim irreg, base(0) rob cluster(ccode) 
esttab using nocontrols.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 scalars("chi2 Chi2") replace label nogap nonumbers mtitle("Model 1" "Model 2" "Model 3" "Model 4" "Model 5" "Model 6" "Model 7")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim anyelect_ss irreg) booktabs noomitted alignment(D{.}{.}{-1}) longtable title(Multinomial Logit Results (Reduced Models) \label{tab:tab7}) 

***** Precision Check (not shown) *****
use "SDCC_conflict.dta", clear
drop if prec == 1 | prec == 2

eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using prec.rtf, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) noomitted 

***** Drop political cleansings (not shown) *****
use "SDCC_conflict.dta", clear
drop if sdcc_id == 30 | sdcc_id == 126

eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using prec2.rtf, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) noomitted 

***** Restrict sample to 1975-2008 (Appendix 4.3) *****
use "SDCC_conflict.dta", clear
drop if pre75 == 1

eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using multinomial75.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) booktabs noomitted alignment(D{.}{.}{-1}) longtable title(Strategic Wartime Displacement: Multinomial Logit Results \label{tab:tab4}) 

***** With Regional Controls (Appendix 4.4) *****
use "SDCC_conflict.dta", clear

eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth region, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth region, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth region, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth region, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth region, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth region, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth region, base(0) rob cluster(ccode)
esttab using addcontrol1.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth region) booktabs noomitted alignment(D{.}{.}{-1}) longtable title(Strategic Wartime Displacement: Multinomial Logit Results \label{tab:tab0103}) 

***** With Control for Post-Cold War *****
eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth poscoldwar, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth poscoldwar, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth poscoldwar, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth poscoldwar, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth poscoldwar, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth poscoldwar, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth poscoldwar, base(0) rob cluster(ccode)
esttab using addcontrol2.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth poscoldwar) booktabs noomitted alignment(D{.}{.}{-1}) longtable title(Multinomial Logit Results (Post-Cold War) \label{tab:tab0101}) 

***** With Control for Secessionist War *****
eststo clear
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth succ, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth succ, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type elceliti irreg lpop polity2 deathsmonth succ, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type extsupp rebfr irreg lpop polity2 deathsmonth succ, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type anyelect_ss claim_epr irreg lpop polity2 deathsmonth succ, base(0) rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth succ, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth succ, base(0) rob cluster(ccode)
esttab using addcontrol3.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth succ) booktabs noomitted alignment(D{.}{.}{-1}) longtable title(Multinomial Logit Results (Successonist War) \label{tab:tab0102}) 

***** Binary Logit Models (Appendix 4.5) *****
// Set One
drop if reloc_gov2 == 1 | depop_gov2 == 1
eststo clear
eststo: quietly logit cleans_gov2 lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit cleans_gov2 bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit cleans_gov2 elceliti irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit cleans_gov2 extsupp rebfr irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit cleans_gov2 anyelect_ss claim_epr irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit cleans_gov2 lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit cleans_gov2 bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, rob cluster(ccode)
esttab using cleans1.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}") order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) booktabs alignment(D{.}{.}{-1}) title(Logistic Regression Results: Cleansing (Set One) \label{tab:tab4.31}) 

use "/Users/alichtenheld/Dropbox/Research Projects/IO Article/Manuscript/data/Sdcc_conflict.dta", clear

drop if cleans_gov2 == 1 | depop_gov2 == 1
eststo clear
eststo: quietly logit reloc_gov2 lndist_tot lnlandar parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit reloc_gov2 bordconf parallelconf gdpcapita milper irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit reloc_gov2 elceliti irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit reloc_gov2 extsupp rebfr irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit reloc_gov2 anyelect_ss claim_epr irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit reloc_gov2 lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit reloc_gov2 bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, rob cluster(ccode)
esttab using resett1.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}") order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) booktabs alignment(D{.}{.}{-1}) title(Logistic Regression Results: Relocation (Set One) \label{tab:tab4.32}) 

use "/Users/alichtenheld/Dropbox/Research Projects/IO Article/Manuscript/data/Sdcc_conflict.dta", clear

// Set Two
eststo clear
eststo: quietly logit cleans_gov lndist_tot lnlandar parallelconf gdpcapita milper depop_gov reloc_gov irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit cleans_gov bordconf parallelconf gdpcapita milper depop_gov reloc_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit cleans_gov elceliti depop_gov reloc_gov irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit cleans_gov extsupp rebfr depop_gov reloc_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit cleans_gov anyelect_ss claim_epr depop_gov reloc_gov irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit cleans_gov lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss depop_gov reloc_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit cleans_gov bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss depop_gov reloc_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
esttab using cleans2.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}") order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss depop_gov reloc_gov irreg lpop polity2 deathsmonth) booktabs alignment(D{.}{.}{-1}) title(Logistic Regression Results: Cleansing (Set Two) \label{tab:tab4.33}) 

eststo clear
eststo: quietly logit reloc_gov lndist_tot lnlandar parallelconf gdpcapita milper depop_gov cleans_gov irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit reloc_gov bordconf parallelconf gdpcapita milper depop_gov cleans_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit reloc_gov elceliti depop_gov cleans_gov irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit reloc_gov extsupp rebfr depop_gov cleans_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit reloc_gov anyelect_ss claim_epr depop_gov cleans_gov irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly logit reloc_gov lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss depop_gov cleans_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
eststo: quietly logit reloc_gov bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss depop_gov cleans_gov irreg lpop polity2 deathsmonth, rob cluster(ccode)
esttab using resett2.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 scalars("chi2 Wald Chi2") replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Assortative)}" "\shortstack{Model 2\\(Assortative)}" "\shortstack{Model 3\\(Nationalism)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}") order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper elceliti extsupp rebfr claim_epr anyelect_ss depop_gov cleans_gov irreg lpop polity2 deathsmonth) booktabs alignment(D{.}{.}{-1}) title(Logistic Regression Results: Forced Relocation (Set Two) \label{tab:tab4.34}) 

***** Alternative Measures for Competing Explanations (Appendix 4.6) *****
eststo clear
eststo: quietly mlogit sd_gov_type ginclus irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type ethpol irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type drugs_fl irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type conc_reb irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type PITFgen irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper ethpol ginclus drugs_fl conc_reb PITFgen claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper ethpol ginclus drugs_fl conc_reb PITFgen claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using alt1.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Nationalism)}" "\shortstack{Model 2\\(Nationalism)}" "\shortstack{Model 3\\(Denial)}" "\shortstack{Model 4\\(Denial)}" "\shortstack{Model 5\\(Punishment)}" "\shortstack{Model 6\\(Full Model)}" "\shortstack{Model 7\\(Full Model)}"})  order(lndist_tot lnlandar bordconf parallelconf milper gdpcapita ginclus ethpol drugs_fl conc_reb PITFgen claim_epr anyelect_ss irreg lpop polity2 deathsmonth) booktabs noomitted longtable alignment(D{.}{.}{-1}) title(Multinomial Logit Results (Other Variables) \label{tab:tab4.366})

***** Desperation (Appendix 4.7) *****
eststo clear
eststo: quietly mlogit sd_gov_type rebstrength irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type rebterrcont irreg lpop polity2 deathsmonth, rob cluster(ccode) 
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf rebstrength elceliti extsupp rebfr claim_epr anyelect_ss irreg gdpcapita lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type lndist_tot lnlandar parallelconf gdpcapita milper rebterrcont elceliti extsupp rebfr claim_epr anyelect_ss irreg gdpcapita lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper rebstrength elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
eststo: quietly mlogit sd_gov_type bordconf parallelconf gdpcapita milper rebterrcont elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth, base(0) rob cluster(ccode)
esttab using alt2.tex, starlevels( * 0.10 ** 0.05 *** 0.010) se b(2) pr2 replace label nogap nonumbers mtitle("\shortstack{Model 1\\(Desperation)}" "\shortstack{Model 2\\(Desperation)}" "\shortstack{Model 3\\(Full Model)}" "\shortstack{Model 4\\(Full Model)}" "\shortstack{Model 5\\(Full Model)}" "\shortstack{Model 6\\(Full Model)}")  order(lndist_tot lnlandar bordconf parallelconf gdpcapita milper rebstrength rebterrcont elceliti extsupp rebfr claim_epr anyelect_ss irreg lpop polity2 deathsmonth) booktabs noomitted longtable alignment(D{.}{.}{-1}) title(Multinomial Logit Results (Desperation) \label{tab:tab4.367})

*****ADDITIONAL FIGURES******

***Figure 1.1 (Appendix)

tab sd
tab cleans_gov
tab depop_gov
tab reloc_gov 
tab cleans_reb
tab depop_reb
tab resett_reb

***Tables 2.1-2.10 (Appendix)

************************************
***(1) SD AND ETHNIC WAR************
************************************

label variable sd_gov_type "Displacement Type"
label variable ethwar_kb ""
label define ETH 0 "Non-Ethnic War" 1 "Ethnic War" 
label val ethwar_kb ETH 
tabout sd_gov_type ethwar_kb using ethwar.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

********************************************
***(2) SWD AND TECHNOLOGY OF REBELLION******
********************************************
tabout sd_gov_type techrebel using tor.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)
tabout sd_gov_type techrebelend using tor2.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

************************************
***(3) SWD AND BORDER CONFLICT******
************************************
label define BC 0 "Non-Border Conflict" 1 "Border Conflict" 
label val bordconf BC 
tabout sd_gov_type bordconf using confbord.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

************************************
***(4) SD AND PARALLEL CONFLICT******
************************************
label define PL 0 "No Parallel Conflict" 1 "Parallel Conflict" 
label val parallelconf PL 
tabout sd_gov_type parallelconf using parallel.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

************************************
***(5) SWD AND REBEL FR*************
************************************
label define FR 0 "No Rebel FR" 1 "Rebel FR" 
label val rebfr FR 
tabout sd_gov_type rebfr using rebelfr.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

************************************
***(6) SD AND ELECTIONS*************
************************************
label define elect 0 "No Elections" 1 "Elections" 
label val anyelect_ss elect 
tabout sd_gov_type anyelect_ss using elections1.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

label val locelect_ss elect
tabout sd_gov_type locelect_ss using elections2.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

label val election_NELDA elect 
tabout sd_gov_type election_NELDA using elections3.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)

************************************
***(6) SD AND BATTLE DEATHS*********
************************************
graph box deathsmonth, over(sd_gov_type) ytitle(Battle Deaths/Month) nooutsides

tabstat bdead_presd bdead_postsd if cleans_gov == 1, s(n mean med sd min max)
tabstat bdead_presd bdead_postsd if reloc_gov == 1, s(n mean med sd min max)

***Descriptive Stats 3.1 (Appendix)

eststo clear
estpost tabstat cleans_gov depop_gov reloc_gov irreg bordconf lndist_tot lnlandar parallelconf gdpcapita milper elceliti extsupp rebfr anyelect_ss claim_epr lpop polity2 deathsmonth, statistics(count mean sd min max) col(stats) 
esttab using summarystats.tex, cells((count(label(Obs)) mean(label(Mean)fmt(%9.2f)) sd(label(Std Dev)fmt(%9.2f)) min(label(Min)fmt(%9.2f)) max(label(Max)fmt(%9.2f)))) label noobs nonumber nomtitles title(Summary Statistics\label{tab3}) replace 

**Outcomes 4.1
label define OUT 0 "Incumbent Loss" 1 "Draw" 2 "Incumbent Victory" 
label val outcome OUT 
tabout sd_gov_type outcome using outcomes.tex, replace c(freq col) f(0c 1) stats(chi2) style(tex) font(italic)
